<template>
  <div class="home-recommend">
    <div class="recommend-item" v-for="(item, index) in recommendsList" :key="index">
      <a :href="item.link">
        <img :src="item.image" :alt="item.title" />
        <div>{{item.title}}</div>
      </a>
    </div>
  </div>
</template>

<script>
export default {
  name: "home-recommend",
  props: {
    recommendsList: {
      type: Array,
      default() {
        return [];
      }
    }
  }
};
</script>

<style scoped>
.home-recommend {
  display: flex;
  padding: 10px 0 15px;
  border-bottom: 3px solid #e1e1e1;
}
.recommend-item {
  flex: 1;
}
.recommend-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.recommend-item img {
  width: 85%;
  margin-bottom: 10px;
}
</style>